package com.softcits.sp01;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

import com.softcits.sp01.service.IMailService;
import com.softcits.sp01.service.MailService;

public class Sp01App {
    private static final Logger logger = LoggerFactory.getLogger(Sp01App.class);
    public static void main(String[] args) {
        logger.debug("START...");
        AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(AppConfig.class);

        AppConfig af = ctx.getBean(AppConfig.class);
        af.outputProperties();
        
        IMailService mail = ctx.getBean(MailService.class);
        // just for test;
        mail.send();
        
        ctx.close();
        logger.debug("END...");
    }

}
